package com.sevenmall.productservice.pojo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author Yesi
 * @since 2020-08-24
 */
@TableName("sevenmall_product")
public class Product extends Model<Product> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品简介
     */
    private String description;

    /**
     * 分类表的分类ID
     */
    private Integer category_id;

    /**
     * 分类表的分类名称,冗余
     */
    private String category_name;

    /**
     * 品牌表的品牌ID
     */
    private Integer brand_id;

    /**
     * 品牌表的品牌名称,冗余
     */
    private String brand_name;

    /**
     * 商品页面商品图片
     */
    private String pic_url;

    /**
     * 画册图片,连产品图片限制为5张，以逗号分割
     */
    private String album_url;

    /**
     * 副标题
     */
    private String sub_title;

    /**
     * 商品详细介绍，是富文本格式
     */
    private String detail;

    /**
     * 货号
     */
    private String product_sn;

    /**
     * 商品重量，默认为克
     */
    private BigDecimal weight;

    /**
     * 商品单位,例如件、盒
     */
    private String unit;

    /**
     * 商品关键字,采用逗号间隔
     */
    private String keywords;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 库存预警值
     */
    private Integer low_stock;

    /**
     * 销量
     */
    private Integer sale;

    /**
     * 上架状态：0->下架；1->上架
     */
    private Integer publish_status;

    /**
     * 创建时间
     */
    private LocalDateTime add_time;

    /**
     * 更新时间
     */
    private LocalDateTime update_time;

    /**
     * 逻辑删除
     */
    private Boolean deleted;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public Integer getCategory_id() {
        return category_id;
    }

    public void setCategory_id(Integer category_id) {
        this.category_id = category_id;
    }
    public String getCategory_name() {
        return category_name;
    }

    public void setCategory_name(String category_name) {
        this.category_name = category_name;
    }
    public Integer getBrand_id() {
        return brand_id;
    }

    public void setBrand_id(Integer brand_id) {
        this.brand_id = brand_id;
    }
    public String getBrand_name() {
        return brand_name;
    }

    public void setBrand_name(String brand_name) {
        this.brand_name = brand_name;
    }
    public String getPic_url() {
        return pic_url;
    }

    public void setPic_url(String pic_url) {
        this.pic_url = pic_url;
    }
    public String getAlbum_url() {
        return album_url;
    }

    public void setAlbum_url(String album_url) {
        this.album_url = album_url;
    }
    public String getSub_title() {
        return sub_title;
    }

    public void setSub_title(String sub_title) {
        this.sub_title = sub_title;
    }
    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }
    public String getProduct_sn() {
        return product_sn;
    }

    public void setProduct_sn(String product_sn) {
        this.product_sn = product_sn;
    }
    public BigDecimal getWeight() {
        return weight;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }
    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }
    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }
    public Integer getLow_stock() {
        return low_stock;
    }

    public void setLow_stock(Integer low_stock) {
        this.low_stock = low_stock;
    }
    public Integer getSale() {
        return sale;
    }

    public void setSale(Integer sale) {
        this.sale = sale;
    }
    public Integer getPublish_status() {
        return publish_status;
    }

    public void setPublish_status(Integer publish_status) {
        this.publish_status = publish_status;
    }
    public LocalDateTime getAdd_time() {
        return add_time;
    }

    public void setAdd_time(LocalDateTime add_time) {
        this.add_time = add_time;
    }
    public LocalDateTime getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(LocalDateTime update_time) {
        this.update_time = update_time;
    }
    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Product{" +
            "id=" + id +
            ", name=" + name +
            ", description=" + description +
            ", category_id=" + category_id +
            ", category_name=" + category_name +
            ", brand_id=" + brand_id +
            ", brand_name=" + brand_name +
            ", pic_url=" + pic_url +
            ", album_url=" + album_url +
            ", sub_title=" + sub_title +
            ", detail=" + detail +
            ", product_sn=" + product_sn +
            ", weight=" + weight +
            ", unit=" + unit +
            ", keywords=" + keywords +
            ", price=" + price +
            ", stock=" + stock +
            ", low_stock=" + low_stock +
            ", sale=" + sale +
            ", publish_status=" + publish_status +
            ", add_time=" + add_time +
            ", update_time=" + update_time +
            ", deleted=" + deleted +
        "}";
    }
}
